# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=dleyna-renderer
pkgver=0.7.0+6+g5b26696
pkgrel=1
pkgdesc="Library to discover and manipulate Digital Media Renderers"
url="https://github.com/phako/dleyna-renderer"
arch=(x86_64)
license=(LGPL2.1)
depends=(dleyna-connector-dbus gupnp-av gupnp-dlna libsoup)
makedepends=(git meson docbook-xsl)
_commit=5b26696fcd26e348c38ca556869fdcb8049e7ce1  # master
source=("git+https://github.com/phako/dleyna-renderer#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd $pkgname

  # Fixup tag so master is a descendant
  git tag -f 0.7.0 04a4f2bcb3e4bdd622867c60c90499ed76f1e712
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
